package com.acwing.partition13;

import java.io.*;

/**
 * @author `RKC`
 * @date 2022/3/9 9:53
 */
public class AC1242修改数组 {

    private static final int N = 1000010;
    private static int[] parent = new int[N];
    private static int n;

    private static final BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
    private static final BufferedWriter writer = new BufferedWriter(new OutputStreamWriter(System.out));

    public static void main(String[] args) throws IOException {
        n = Integer.parseInt(reader.readLine());
        for (int i = 0; i < N; i++) parent[i] = i;
        String[] ss = reader.readLine().split(" ");
        for (int i = 0; i < n; i++) {
            int num = Integer.parseInt(ss[i]);
            int x = find(num);
            writer.write(x + " ");
            parent[x] = x + 1;
        }
        writer.flush();
    }

    private static int find(int a) {
        if (parent[a] != a) parent[a] = find(parent[a]);
        return parent[a];
    }
}
